package sqlparser;

public class CreateUserSqlParser extends BaseSingleSqlParser {

    public CreateUserSqlParser(String originalSql) {
        super(originalSql);
    }


    @Override        //不是普通语句,前后两个部分,分两片
    protected void initializeSegments() {
        segments.add(new SqlSegment("(create user)(.+)(@)", "[,]"));

        //找出给哪一个主机,但是没必要了   segments.add(new SqlSegment("(@)(.+)(IDENTIFIED BY)", "[,]"));

        segments.add(new SqlSegment("(IDENTIFIED BY)(.+)(ENDOFSQL)", "[,]"));
    }

}
